import 'package:package_info_plus/package_info_plus.dart';

/// 信息工具类
class InfoUtil {
  /// 版本code
  static Future<int> versionCode() async {
    var info = await PackageInfo.fromPlatform();
    return int.parse(info.buildNumber);
  }

  /// 版本名称
  static Future<String> versionName() async {
    var info = await PackageInfo.fromPlatform();
    return info.version;
  }
}
